{% comment %}
#    This file is part of OpenPolitik.
#
#    OpenPolitik is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    OpenPolitik is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with OpenPolitik.  If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}
{% extends "layout.html" %}

{% block content %}
{% if games_in %}
	<div>
	<h2>You are in the following games:</h2>
	<ul>
	{% for game in games_in %}
		<li class = "{% cycle light,dark %}"><a href = "/game?game={{ game.key }}">{{ game.name }}</a></li>
	{% endfor %}
	</ul>
	</div>
{% endif %}
<div>
<h2>Open Games:</h2>
{% if games|length_is:0 %}
	<p><i>No games found...</i></p>
{% else %}
	<ul>
	{% for game in games %}
		<li><a href = "/game?game={{ game.key }}">{{ game.name }}</a></li>
	{% endfor %}
	</ul>
{% endif %}
<a href = "/create_game">Create Game</a>
</div>
{% endblock %}
